package athabasca.ca.model;

import java.util.Date;

public class FeatureUsage
{
	private float currentValue;

	private Date startUsing, endUsing;
	
	public FeatureUsage(float currentValue)
	{
		this.currentValue = currentValue;
		this.startUsing = null;
		this.endUsing = null;
	}
	
	public FeatureUsage ( Date startUsing, Date endUsing )
	{
		this.startUsing = startUsing;
		this.endUsing = endUsing;
		
		this.currentValue = ( this.endUsing.getTime ( ) - this.startUsing.getTime ( ) ) * 1000;
		// multiply it for 1000 so you will obtain usage in seconds
	}
	
	public float getCurrentValue()
	{
		return currentValue;
	}
	
	public void setCurrentValue ( float currentValue )
	{
		this.currentValue = currentValue;
	}
	
	public Date getStartUsing ( ) 
	{
		return startUsing;
	}

	public void setStartUsing ( Date startUsing )
	{
		this.startUsing = startUsing;
	}

	public Date getEndUsing ( )
	{
		return endUsing;
	}

	public void setEndUsing ( Date endUsing ) 
	{
		this.endUsing = endUsing;
	}
	
}
